﻿<%@ Page Title="" Language="C#" MasterPageFile="~/MasterPage/MainPopUp.master" AutoEventWireup="true"
    CodeFile="MuayeneEkle.aspx.cs" Inherits="Ithalat_PopUp_MuayeneEkle" Theme="Main" %>

<asp:Content ID="Content1" ContentPlaceHolderID="cph1" runat="Server">

    <script type="text/javascript">
        $(function() {

            $(window).unload(function() {
                window.opener.location = window.opener.location;
            });
        });
    </script>

    <table style="width: 100%;" class="YMAnaTablo">
        <tr>
            <th class="ThBaslikRenk1">
                <asp:Label ID="LabelBaslik" runat="server"></asp:Label>
            </th>
        </tr>
        <tr>
            <td>
                <table style="width: 100%">
                    <tr>
                        <td class="TdRenkSol" style="width: 13%">
                            Rapor No :
                        </td>
                        <td colspan="3">
                            <asp:TextBox ID="TextBoxRaporNo" runat="server" Width="150"></asp:TextBox>
                        </td>
                    </tr>
                    <tr>
                        <td class="TdRenkSol">
                            Analizin Başlama ve Bitiş Tarihi :
                        </td>
                        <td colspan="3">
                            <TKB:TarihTextBoxIkili ID="TarihAnalizBaslamaBitisTarihi" runat="server" />
                        </td>
                    </tr>
                    <tr>
                        <td class="TdRenkSol">
                            Analizin Amacı :
                        </td>
                        <td colspan="3">
                            <asp:TextBox ID="TextBoxAnalizinAmaci" runat="server" TextMode="MultiLine" Width="500"
                                Height="40"></asp:TextBox>
                        </td>
                    </tr>
                    <tr>
                        <td class="TdRenkSol" style="text-align: center" colspan="4">
                            Numune Bilgileri
                        </td>
                    </tr>
                    <tr>
                        <td class="TdRenkSol">
                            Laboratuvara Geldiği Tarih, Saat :
                        </td>
                        <td style="width: 40%">
                            <table>
                                <tr>
                                    <td>
                                        <TKB:TarihTextBox ID="TarihLaboratuvaraGeldigiTarih" runat="server" />
                                    </td>
                                    <td>
                                        <asp:DropDownList ID="DropDownListSaat" runat="server">
                                        </asp:DropDownList>
                                    </td>
                                    <td style="font-weight: bold">
                                        :
                                    </td>
                                    <td>
                                        <asp:DropDownList ID="DropDownListDakika" runat="server">
                                        </asp:DropDownList>
                                    </td>
                                </tr>
                            </table>
                        </td>
                        <td class="TdRenkSol">
                            Tutanak Tarih, Sayı :
                        </td>
                        <td>
                            <table>
                                <tr>
                                    <td>
                                        <TKB:TarihTextBox ID="TarihTutanakTarihi" runat="server" />
                                    </td>
                                    <td style="font-weight: bold">
                                        -
                                    </td>
                                    <td>
                                        <asp:TextBox ID="TextBoxTutanakSayisi" runat="server" Width="80"></asp:TextBox>
                                    </td>
                                </tr>
                            </table>
                        </td>
                    </tr>
                    <tr>
                        <td class="TdRenkSol">
                            Cinsi :
                        </td>
                        <td>
                            <asp:TextBox ID="TextBoxCinsi" runat="server" Width="330"></asp:TextBox>
                        </td>
                        <td class="TdRenkSol">
                            Yazı Tarih, Sayı :
                        </td>
                        <td>
                            <table>
                                <tr>
                                    <td>
                                        <TKB:TarihTextBox ID="TarihYaziTarihi" runat="server" />
                                    </td>
                                    <td style="font-weight: bold">
                                        -
                                    </td>
                                    <td>
                                        <asp:TextBox ID="TextBoxYaziSayisi" runat="server" Width="80"></asp:TextBox>
                                    </td>
                                </tr>
                            </table>
                        </td>
                    </tr>
                    <tr>
                        <td class="TdRenkSol" style="width: 13%">
                            Gönderen Kuruluş :
                        </td>
                        <td>
                            <asp:DropDownList ID="DropDownListGonderenKurulus" runat="server" Width="335" DataTextField="FirmAdi"
                                DataValueField="FirmaKey">
                            </asp:DropDownList>
                        </td>
                        <td class="TdRenkSol">
                            İthalatçı Firma Adı :
                        </td>
                        <td>
                            <asp:DropDownList ID="DropDownListIthalatciFirmaAdi" runat="server" Width="285" DataTextField="FirmAdi"
                                DataValueField="FirmaKey">
                            </asp:DropDownList>
                        </td>
                    </tr>
                    <tr>
                        <td class="TdRenkSol">
                            Ambalajı :
                        </td>
                        <td>
                            <asp:TextBox ID="TextBoxAmbalaji" runat="server" Width="330"></asp:TextBox>
                        </td>
                        <td class="TdRenkSol">
                            G.T.İ.P. No :
                        </td>
                        <td>
                            <asp:TextBox ID="TextBoxGTIPNo" runat="server" Width="280"></asp:TextBox>
                        </td>
                    </tr>
                    <tr>
                        <td class="TdRenkSol">
                            Üretim ve Son Kull. Tar. :
                        </td>
                        <td>
                            <TKB:TarihTextBoxIkili ID="TarihUretimveSonKullanmaTarihi" runat="server" />
                        </td>
                        <td class="TdRenkSol">
                            Gümrük Giriş Beyan No :
                        </td>
                        <td>
                            <asp:TextBox ID="TextBoxGumrukGirisBeyanNo" runat="server" Width="280"></asp:TextBox>
                        </td>
                    </tr>
                    <tr>
                        <td class="TdRenkSol">
                            Seri-Parti No :
                        </td>
                        <td>
                            <asp:TextBox ID="TextBoxSeriPartNo" runat="server" Width="330"></asp:TextBox>
                        </td>
                        <td class="TdRenkSol">
                            İthal Edilen Ülke :
                        </td>
                        <td>
                            <asp:DropDownList ID="DropDownListIthalEdilenUlke" runat="server" Width="285" DataTextField="UlkeAdi"
                                DataValueField="UlkeKey">
                            </asp:DropDownList>
                        </td>
                    </tr>
                    <tr>
                        <td class="TdRenkSol">
                            Miktarı (Net) :
                        </td>
                        <td>
                            <asp:TextBox ID="TextBoxMiktari" runat="server" Width="330"></asp:TextBox>
                        </td>
                        <td class="TdRenkSol">
                            Üretici Firma Adı :
                        </td>
                        <td>
                            <asp:DropDownList ID="DropDownListUreticiFirmaAdi" runat="server" Width="285" DataTextField="FirmAdi"
                                DataValueField="FirmaKey">
                            </asp:DropDownList>
                        </td>
                    </tr>
                    <tr>
                        <td class="TdRenkSol">
                            Alındığı Gümrük :
                        </td>
                        <td>
                            <asp:DropDownList ID="DropDownListAlindigiGumruk" runat="server" Width="335" DataTextField="GumrukAdi"
                                DataValueField="GumrukKey">
                            </asp:DropDownList>
                        </td>
                        <td class="TdRenkSol">
                            Alınış Tarihi :
                        </td>
                        <td>
                            <TKB:TarihTextBox ID="TarihTextBoxAlinisTarihi" runat="server" />
                        </td>
                    </tr>
                    <tr>
                        <td class="TdRenkSol">
                            İzin Verilen Miktar :
                        </td>
                        <td>
                            <asp:TextBox ID="TextBoxIzinVerilenMiktar" runat="server" Width="330"></asp:TextBox>
                        </td>
                        <td class="TdRenkSol">
                            Kontrol Belgesi Tarih, No :
                        </td>
                        <td>
                            <table>
                                <tr>
                                    <td>
                                        <TKB:TarihTextBox ID="TarihKontrolBelgesiTarihi" runat="server" />
                                    </td>
                                    <td style="font-weight: bold">
                                        -
                                    </td>
                                    <td>
                                        <asp:TextBox ID="TextBoxKontrolBelgesiSayisi" runat="server" Width="80"></asp:TextBox>
                                    </td>
                                </tr>
                            </table>
                        </td>
                    </tr>
                    <tr>
                        <td class="TdRenkSol">
                            İthali Gerçekleşen Miktar :
                        </td>
                        <td colspan="3">
                            <asp:TextBox ID="TextBoxIthaliGerceklesenMiktar" runat="server" Width="330"></asp:TextBox>
                        </td>
                    </tr>
                    <tr>
                        <td class="TdRenkSol" style="text-align: center" colspan="4">
                            Yapılan Analizler
                        </td>
                    </tr>
                    <tr>
                        <td colspan="4">
                            <asp:UpdatePanel ID="UpdatePanelAnaliz" runat="server">
                                <ContentTemplate>
                                    <table style="width: 100%">
                                        <tr>
                                            <td style="text-align: right">
                                                <asp:LinkButton ID="LinkButtonEkle" runat="server" Text="Analiz Ekle" OnClick="LinkButtonEkle_Click"></asp:LinkButton>
                                            </td>
                                        </tr>
                                        <tr>
                                            <td>
                                                <asp:GridView ID="gvAnalizler" runat="server" AutoGenerateColumns="False" Width="100%"
                                                    EmptyDataText="Analiz Eklenmemiştir." OnRowCancelingEdit="gvAnalizler_RowCancelingEdit"
                                                    OnRowDeleting="gvAnalizler_RowDeleting" OnRowEditing="gvAnalizler_RowEditing"
                                                    OnRowUpdating="gvAnalizler_RowUpdating" DataKeyNames="AnalizKey" OnRowDataBound="gvAnalizler_RowDataBound">
                                                    <Columns>
                                                        <asp:TemplateField>
                                                            <HeaderTemplate>
                                                                ADI
                                                            </HeaderTemplate>
                                                            <ItemTemplate>
                                                                <asp:Label ID="LabelAdi" runat="server" Text='<%#Eval("Adi") %>'></asp:Label>
                                                            </ItemTemplate>
                                                            <ItemStyle CssClass="columnborder" Width="25%" />
                                                            <EditItemTemplate>
                                                                <asp:TextBox ID="TextBoxAdi" runat="server" Width="95%" Text='<%#Eval("Adi") %>'></asp:TextBox>
                                                            </EditItemTemplate>
                                                        </asp:TemplateField>
                                                        <asp:TemplateField>
                                                            <HeaderTemplate>
                                                                SONUÇ
                                                            </HeaderTemplate>
                                                            <ItemTemplate>
                                                                <asp:Label ID="LabelSonuc" runat="server" Text='<%#Eval("Sonuc") %>'></asp:Label>
                                                            </ItemTemplate>
                                                            <ItemStyle CssClass="columnborder" Width="25%" />
                                                            <EditItemTemplate>
                                                                <asp:TextBox ID="TextBoxSonuc" runat="server" Width="95%" Text='<%#Eval("Sonuc") %>'></asp:TextBox>
                                                            </EditItemTemplate>
                                                        </asp:TemplateField>
                                                        <asp:TemplateField>
                                                            <HeaderTemplate>
                                                                ÖLÇÜM LİMİTİ
                                                            </HeaderTemplate>
                                                            <ItemTemplate>
                                                                <asp:Label ID="LabelOlcum" runat="server" Text='<%#Eval("OlcumLimiti") %>'></asp:Label>
                                                            </ItemTemplate>
                                                            <ItemStyle CssClass="columnborder" Width="25%" />
                                                            <EditItemTemplate>
                                                                <asp:TextBox ID="TextBoxOlcumlimiti" runat="server" Width="95%" Text='<%#Eval("OlcumLimiti") %>'></asp:TextBox>
                                                            </EditItemTemplate>
                                                        </asp:TemplateField>
                                                        <asp:TemplateField>
                                                            <HeaderTemplate>
                                                                ANALİZ METODU
                                                            </HeaderTemplate>
                                                            <ItemTemplate>
                                                                <asp:Label ID="LabelAnalizMetodu" runat="server" Text='<%#Eval("AnalizMetodAdi") %>'></asp:Label>
                                                            </ItemTemplate>
                                                            <ItemStyle CssClass="columnborder" />
                                                            <EditItemTemplate>
                                                                <asp:DropDownList ID="DropDownListAnalizMetodAdi" runat="server" Width="95%" DataTextField="AnalizMetodAdi"
                                                                    DataValueField="AnalizMetodTipNo">
                                                                </asp:DropDownList>
                                                            </EditItemTemplate>
                                                        </asp:TemplateField>
                                                        <asp:CommandField CancelText="İptal" ShowEditButton="True" ShowHeader="True" ShowCancelButton="true"
                                                            ShowDeleteButton="true" EditText="Düzenle" InsertText="Ekle" DeleteText="Sil"
                                                            UpdateText="Güncelle" NewText="Yeni" ItemStyle-CssClass="columnborder" ItemStyle-Width="5%"
                                                            InsertVisible="False">
                                                            <ItemStyle CssClass="columnborder" Width="5%" />
                                                        </asp:CommandField>
                                                    </Columns>
                                                    <EmptyDataRowStyle Font-Bold="True" ForeColor="Red" />
                                                </asp:GridView>
                                            </td>
                                        </tr>
                                    </table>
                                </ContentTemplate>
                            </asp:UpdatePanel>
                        </td>
                    </tr>
                </table>
            </td>
        </tr>
        <tr>
            <td style="text-align: center">
                <asp:Button ID="ButtonKaydet" runat="server" SkinID="ButtonKaydet" OnClick="ButtonKaydet_Click" />
            </td>
        </tr>
    </table>
</asp:Content>
